Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Rpc: Add getConfirmedTransaction #9381

Conversation

CriesofCarrots
Copy link
Contributor

Problem

It's not possible to fetch the details of a specific transaction from an API node unless you happen to know the Slot it was processed in (forgetConfirmedBlock). Now that we have a performant way to query statuses by Signature, we can offer a more targeted approach.

Summary of Changes

  • Add apis to return from blockstore details of a single transaction given its signature, building on Blockstore::get_transaction_status
  • Add getConfirmedTransaction RPC endpoint and hook up to blockstore. As implied by the endpoint name, getConfirmedTransaction will only return details for transactions in rooted blocks.

Toward #9317

@codecov
Copy link

codecov bot commented Apr 8, 2020

Codecov Report

Merging #9381 into master will decrease coverage by 0.0%.
The diff coverage is 78.4%.

@@           Coverage Diff            @@
##           master   #9381     +/-   ##
========================================
- Coverage    81.1%   81.1%   -0.1%     
========================================
  Files         276     276             
  Lines       62075   62168     +93     
========================================
+ Hits        50389   50457     +68     
- Misses      11686   11711     +25     

@CriesofCarrots CriesofCarrots merged commit e1aa247 into solana-labs:master Apr 9, 2020
mergify bot pushed a commit that referenced this pull request Apr 9, 2020
* Add blockstore method to return a complete transaction by signature

* Plumb getConfirmedTransaction rpc

* Add doc

(cherry picked from commit e1aa247)
mergify bot pushed a commit that referenced this pull request Apr 9, 2020
* Add blockstore method to return a complete transaction by signature

* Plumb getConfirmedTransaction rpc

* Add doc

(cherry picked from commit e1aa247)
solana-grimes pushed a commit that referenced this pull request Apr 9, 2020
solana-grimes pushed a commit that referenced this pull request Apr 9, 2020
@CriesofCarrots CriesofCarrots deleted the add-get-confirmed-transaction branch April 16, 2020 17:38
danpaul000 pushed a commit to danpaul000/solana that referenced this pull request Jul 8, 2020
* Add blockstore method to return a complete transaction by signature

* Plumb getConfirmedTransaction rpc

* Add doc
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants